#include "DeviceInformation.h"

DeviceInformation::	DeviceInformation(WCHAR* deviceId, map<wstring, wstring>* VID_MAP,
														map<wstring, wstring>* PID_MAP)
{
	WCHAR wcNumber[4];

	mystrcpy(deviceId, this->deviceId, wcslen(deviceId));
	
	mystrcpy(deviceId + 12, wcNumber, 4);
	vendorName = (*VID_MAP)[wcNumber];

	mystrcpy(deviceId + 21, wcNumber, 4);
	deviceName = (*PID_MAP)[wcNumber];
}

void DeviceInformation::mystrcpy(const WCHAR* source, WCHAR* destination, unsigned int count)
{
	for (int i = 0; i < count; i++)
	{
		destination[i] = source[i];
	}
}


std::wstring DeviceInformation:: GetDevName()
{
	return deviceName;
}

std::wstring DeviceInformation:: GetVendorName()
{
	return vendorName;
}

DeviceInformation::~DeviceInformation()
{
	;
}
